package edu.midir.demo.config;

import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;

@EnableWebSecurity
public class WebSecurityConfig extends
        WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
            System.out.println("configure");
            http.csrf().disable();
            http.authorizeRequests().antMatchers("/").permitAll();

    }

//    @Bean
//	public FilterRegistrationBean registerFilter() {
//
//		FilterRegistrationBean bean = new FilterRegistrationBean();
//
//		bean.addUrlPatterns("/*");
//		bean.setFilter(new CrosFilter());
//
//		return bean ;
//	}
}